package com.xiaoyu.awakening.ai.control.api;

import com.xiaoyu.awakening.ai.control.entity.dto.AwkChatCompletionsResDto;
import com.xiaoyu.awakening.common.core.dto.Result;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.http.MediaType;
import org.springframework.http.codec.ServerSentEvent;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;

/**
 * 检索
 *
 * @author wangxiaoyu
 * @since v1.0
 */
@RequestMapping("/api/v1/awk-llm")
@Schema(name = "检索")
public interface IAwkChatControllerApi {

    @PostMapping(value = "/chat-stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
    Flux<ServerSentEvent<AwkChatCompletionsResDto>> completionStream();

    @PostMapping(value = "/chat")
    Result<AwkChatCompletionsResDto> completion();


}
